/*** 借款配置Action
* */
import { Action } from '@ngrx/store';
export const RESET_BORROW_STORE= 'RESET_BORROW_STORE'; // 重置
export const GET_APP_BORROW_PICKER_DEFAULT= 'GET_APP_BORROW_PICKER_DEFAULT'; // 获取借款默认
export const GET_USER_BORROW_PICKER= 'GET_USER_BORROW_PICKER'; // 获取用户借款
export const GET_USER_QUOTA_LIST= 'GET_USER_QUOTA_LIST'; // 获取用户背景信息

export const UPDATE_BORROW_MODAL_STATUS= 'UPDATE_BORROW_MODAL_STATUS'; // 更新借款模态进度

export const GET_USER_BORROW_PROGRESS_SUCCESS= 'GET_USER_BORROW_PROGRESS_SUCCESS'; // 获取借款进度成功
export const GET_USER_BORROW_PROGRESS_FAILED= 'GET_USER_BORROW_PROGRESS_FAILED'; // 获取借款进度失败

export class ResetBorrowStoreAction implements Action {
  readonly type= RESET_BORROW_STORE;
}

export class GetPickerDefaultAction implements Action {
  readonly type= GET_APP_BORROW_PICKER_DEFAULT;
  constructor(public payload: any) {}
}

export class GetPickerUserAction implements Action {
  readonly type= GET_USER_BORROW_PICKER;
  constructor(public payload: any) {}
}

export class GetUserQuotaAction implements Action {
  readonly type= GET_USER_QUOTA_LIST;
  constructor(public payload: any) {}
}

export class UpdateBorrowModalAction implements Action {
  readonly type= UPDATE_BORROW_MODAL_STATUS;
}

export class GetBorrowProgressSuccessAction implements Action {
  readonly type= GET_USER_BORROW_PROGRESS_SUCCESS;
  constructor(public payload: any) {}
}
export class GetBorrowProgressFailedAction implements Action {
  readonly type= GET_USER_BORROW_PROGRESS_FAILED;
}

export type All= ResetBorrowStoreAction | GetPickerDefaultAction | GetPickerUserAction | GetUserQuotaAction
  | UpdateBorrowModalAction | GetBorrowProgressSuccessAction | GetBorrowProgressFailedAction;
